Implement changes defined in ADR034 and 035 - #393
NotTheEvilOne wants to merge 2 commits into
Conversation
82428ae to
0efc342
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #393 +/- ##
==========================================
+ Coverage 91.28% 91.77% +0.49%
==========================================
Files 49 51 +2
Lines 2971 3004 +33
==========================================
+ Hits 2712 2757 +45
+ Misses 259 247 -12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
62064c1 to
bfd41fc
Compare
Signed-off-by: Tobias Wolf <wolf@b1-systems.de> On-behalf-of: SAP <tobias.wolf@sap.com>
d8d08bd to
3871196
Compare
|
📚 Documentation Preview PR: gardenlinux/docs#184 A PR has been created/updated to preview the documentation changes from this PR. |
Signed-off-by: Tobias Wolf <wolf@b1-systems.de> On-behalf-of: <tobias.wolf@sap.com>
3871196 to
b1d55ca
Compare
yeoldegrove
left a comment
There was a problem hiding this comment.
Added some comments in the code.
Also please justify in the PR description or fix:
GL_ALLOW_FRANKENSTEINandGL_ALLOW_MULTIPLE_PLATFORMSenv vars are still evaluated andGARDENLINUX_PLATFORMfrom/etc/os-release(created by builder) is not taken into account. This is different as outlined in #376.CName.platformstill exists (related to 1.) but should be reworked as outlined in #377.
| cname, arch = value.rsplit("-", 1) | ||
| self["annotations"][ImageManifest.ANNOTATION_ARCH_KEY] = arch | ||
| self["annotations"][ImageManifest.ANNOTATION_CNAME_KEY] = cname |
There was a problem hiding this comment.
Would it make sense to validate cname and arch?
There was a problem hiding this comment.
Validation could be implemented but would only contain basic formatting validation as we can not hard code a list of architectures or validate the content of the feature list of a CName.
| else: | ||
| features.append(feature) | ||
|
|
||
| return reduce( |
There was a problem hiding this comment.
Does it make sense to use sort_graph_nodes here?
There was a problem hiding this comment.
Unfortunately we would need a graph for using sort_graph_nodes. get_cname_from_feature_set() and get_cname_as_feature_set() accept input from e.g. the os_release file fields without evaluating if the given feature set is plausible. Therefore this sorting can only work with data available.
Thanks for taking your time reviewing. Regarding As the alternative to the enviromment variables an command line argument |
What this PR does / why we need it:
This PR implements changes required to suit ADR034 and 035.
Main changes
Flavor,VersionedFlavorandArtifactBaseName ingardenlinux.features`.flavors.yamlparser ingardenlinux.flavors.Parsergardenlinux.featuresgl-features-parseand remove shortcut command line toolgl-cname.Which issue(s) this PR fixes:
Fixes #376
Fixes #377
Requires #390